<table id="no-spec-input" class="form-table" width="100%">
	<tr>
		<th style="width: 10%">销售价：</th>
		<td style="text-align: left;width: 90%"><input
			type="text" maxlength="7" style="width: 60px;" name="price"
			id="price" class="input_text easyui-validatebox" autocomplete="off" 
			value="${(goods.price!0)?c}"  data-options="precision:2,required:true"/> <!-- <input type="button" class="mempriceBtn button" value="编辑会员价格"/> -->
			<div class="member_price_box">
				<!-- 声明控件，稍后初始化 -->
				<#if lvList?exists> <#list lvList as lv> 
					<input type="hidden" class="lvid" value="${lv.lv_id}" name="lvid" /> 
					<input type="hidden" class="lvPrice" lvid="${lv.lv_id}" name="lvPrice" />
				</#list> </#if>
			</div></td>
	</tr>
	<tr>
		<th>成本价：</th>
		<td style="text-align: left;"><input type="text"
			style="width: 60px;" maxlength="7" name="cost" id="cost" 
			autocomplete="off" value="${(goods.cost!0)?c}" class="input_text easyui-numberbox" data-options="precision:2,required:true" />
		</td>
	</tr>
	<tr>
		<th>重量：</th>
		<td style="text-align: left;"><input type="text" maxlength="7"
			style="width: 60px;" name="weight" id="weight" autocomplete="off"
			value="${(goods.weight!0)?c}" class="input_text easyui-numberbox" data-options="required:true"/>克(g)</td>
	</tr>
	<#if specList?exists && (specList?size gt 0)>
	<tr class="advui">
		<th>规格：</th>
		<td style="padding: 4px 0pt;text-align: left;" >
			<input type="button" id="specOpenBtn" value="开启规格" class="button"/>
		</td>
	</tr>
	</#if>
		
</table>
<#if goods.goods_id?exists && goods.have_spec?exists> 
<#if goods.have_spec==0>
<script>
	$(function() {
		//初始化商品会员价
		$.ajax({
			url : '${ctx}/shop/admin/member-price/get-lv-price-json.do?ajax=yes',
			data : 'goodsid=${goods.goods_id}',
			dataType : 'json',
			success : function(result) {
				if (result.result == 1) {
					var priceData = result.priceData;
					$.each(priceData, function(i, price) {
						$(
								".member_price_box>input.lvPrice[lvid="
										+ price.lvid + "]").val(price.price);
					});
				} else {
					alert("生成会员价格出错：" + result.message);
				}
			},
			error : function() {
				alert("生成会员价格出错");
			}
		});
		MemberPrice.bindMbPricBtnEvent();
	});
</script>
</#if> 
</#if>
